<div class="col-md-6">
    <table class="table" id="create-cluster-form">
        <tbody>
        <tr class="input-tip-tr">
            <td class="field-name">ClusterName</td>
            <td class="field-value">
                <input name="clusterName" data-alias="clusterId" type="text" class="no-border-input form-control" data-ajax-type="get"  placeholder="cluster-name"  data-require="1" data-len="5-20" data-len-msg="length range 5-20" data-format="[a-zA-Z0-9_\-]+" data-format-msg="format letter,number,- or _"  data-server-check="/check/checkClusterName"  >
            </td>
            <td class="field-name">InstallPath</td>
            <td class="field-value">
                <input name="installPath" data-alias="install_path" type="text" class="no-border-input form-control" data-ajax-type="get"  placeholder="installPath"  data-require="1" data-check-fields="iplist" data-len="4-255" data-len-msg="length range 4-255" data-format="^\/[a-zA-Z0-9_\-\/]+" data-format-msg="format error start /" >
            </td>
        </tr>
        <tr class="error-input-tip-tr">
            <td></td>
            <td><div id="clusterName_tip"></div></td>
            <td></td>
            <td><div id="installPath_tip"></div></td>
        </tr>
        <tr class="input-tip-tr">
            <td class="field-name">Image</td>
            <td>
                <select name="image" class="form-control"  data-require="1">
                    {{foreach from=$res item=image}}
                    <option>{{$image}}</option>
                    {{/foreach}}
                </select>
            </td>
            <td class="field-name">Group</td>
            <td>
                <select name="userGroup" class="form-control"  data-require="1">
                    {{foreach from=$groups item=group}}
                    <option>{{$group}}</option>
                    {{/foreach}}
                </select>
            </td>
        </tr>
        <tr class="error-input-tip-tr"><td></td></tr>
        <tr class="input-tip-tr">
            <td class="field-name">UserName</td>
            <td>
                <input name="username" type="text" class="form-control" data-require="1"  data-len="3-20" placeholder="ssh username" data-check-fields="iplist" data-len-msg="length range 3-20" data-format-msg="only support letter and number"/>
            </td>
            <td class="field-name">Password </td>
            <td>
                <input name="password" type="password" class="form-control" data-require="1" data-len="5-20" placeholder="ssh password" data-check-fields="iplist" data-len-msg="length range 5-20" data-format-msg="only support letter and number"/>
            </td>
        </tr>
        <tr class="error-input-tip-tr">
            <td></td>
            <td><div id="username_tip"></div></td>
            <td></td>
            <td><div id="password_tip"></div></td>
        </tr>

        <tr class="input-tip-tr">
            <td class="field-name">RedisPassword</td>
            <td>
                <input name="redisPassword" type="text" class="form-control"  placeholder="redis password" >
            </td>
        </tr>
        <tr class="error-input-tip-tr"><td></td></tr>

        <tr class="input-tip-tr">
            <td class="container-table-tag" >
                Batch IP List
                <pre class="ip-list-tip">
                    format: <font color="red">确保至少一个Master节点和一个Slave节点</font><br/>
                    &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<font color="red">否则可能安装失败</font><br/>
                    127.0.0.1:8054 master<br/>
                    127.0.0.1:8053<br/>
                    127.0.0.1:8056 master<br/>
                    127.0.0.1:8057
                </pre>
            </td>
            <td colspan="3">
                <div class="node-value text-value">
                    <textarea class="host-list form-control" rows="6" name="iplist" data-relation="clusterName,installPath,username,password"  data-require="1" data-server-check="/check/checkBatchHostNotPass,/check/checkBatchDirPermission,/check/checkBatchWgetPermission,/check/checkBatchUserPermisson"  placeholder="example 127.0.0.1:8008 master" ></textarea>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <button class="btn btn-default create-cluster-button" id="start-install-cluster">CreateCluster</button>
            </td>
            <td colspan="3"><div id="iplist_tip"></div></td>
        </tr>
        </tbody>
    </table>
</div><!-- .col-md-6 -->
<div class="col-md-6">
    <div class="panel panel-default">
        <div>
            {{include file="plugin/redis_console.html"}}
        </div>
    </div>
</div>
